package com.ssh.dao.impl;

import com.ssh.dao.BaseDao;
import com.ssh.domain.Department;
import com.ssh.domain.Employee;
import org.springframework.stereotype.Repository;

/**
 * Created by H-209-FX-XY on 2018/4/18.
 */
@Repository
public class DepartmentDaoImpl extends BaseDao{

    public void saveDepartment(){
        Department department = new Department();
        department.setDdesc("aaaa");
        department.setDname("aaa1");
        Employee employee = new Employee();
        employee.setUsername("qqqq111");
        employee.setPassword("111112");
        department.getEmployees().add(employee);
        hibernateTemplate.save(department);
    }
}
